<div class="modal-header">
    <h4>
        <span translate="diagprocess.expdis"></span>
        <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span></button>
    </h4>
</div>
<div class="modal-body" ng-init="selected.input = {}" ng-controller="DiagnosisCtrl">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="common.name"></span></label>

                <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder=""
                           value="{{selected.item._patCase._patient._user.realName}}" disabled style="cursor:default">
                </div>
                <label class="col-sm-2 control-label text-left" style="margin-right:-50px;"><span
                        translate="user.gender"></span></label>

                <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder=""
                           value="{{'user.gender.' + selected.item._patCase._patient._user.gender | translate}}"
                           disabled style="cursor:default">
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="user.mobilephone"></span></label>

                <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder=""
                           value="{{selected.item._patCase._patient._user.mobile_Phone}}" disabled
                           style="cursor:default">
                </div>
                <label class="col-sm-2 control-label text-left" style="margin-right:-50px;"><span
                        translate="user.marriage"></span></label>

                <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder=""
                           value="{{'user.marriage.' + selected.item._patCase._patient._user.marriage | translate}}"
                           disabled style="cursor:default">
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="business.servreq.serviceType"></span></label>

                <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder=""
                           value="{{'servicetype.servicetype_' + selected.item._servType.service_Id | translate}}" disabled
                           style="cursor:default">
                </div>
                <label class="col-sm-2 control-label text-left" style="margin-right:-50px;"><span
                        translate="common.updated"></span></label>

                <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder=""
                           value="{{ moment(selected.item._patCase._patient.updated).format('YYYY-MM-DD')}}"
                           disabled style="cursor:default">
                </div>
            </div>
            <div class="form-group row text-center">
                <button type="button" class="btn btn-info"
                        style="width:120px;"
                        translate="business.servreq.moreDetails"
                        ng-click="open({ templateUrl: 'views/work/basic_servreq_flow.html' },selected.item)">
                </button>
                <button type="button" ng-if="selected.item.patCase_Id > 0"
                        class="btn btn-primary"
                        style="width:120px;"
                        title="{{ 'business.patcase.view_dicom_flag' | translate }}"
                        translate="business.patcase.view_dicom_flag"
                        ng-click="openDicomViewer4Specialist(selected.item.patCase_Id)">
                </button>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="panel-footer">
            <div style="float: left;">
                <button type="button" class="btn-fix btn btn-sm btn-default"
                        title="{{ 'business.patcase.send_for_operation' | translate }}"
                        ng-click="setNeedOpe()"
                        ng-if="true == selected.item.canSetNeedOpe"
                        translate="business.patcase.send_for_operation">
                </button>
                <button type="button" class="btn-fix btn btn-sm btn-default"
                        title="{{ 'business.patcase.send_for_no_operation' | translate }}"
                        ng-click="setNoOpeNeeded()"
                        ng-if="true == selected.item.canSetNoOpeNeeded"
                        translate="business.patcase.noopeneeded">
                </button>
                <button type="button" class="btn-fix btn btn-sm btn-default"
                        title="{{ 'aside.nav.process.fillimagediag' | translate }}"
                        ng-click="imageDiag()"
                        ng-if="true == selected.item.canSetFinish4Diag"
                        translate="aside.nav.process.fillimagediag">
                </button>
                <button type="button" class="btn-fix btn btn-sm btn-default"
                        title="{{'aside.nav.process.fillsurgery'}}"
                        ng-click="opeSche()"
                        ng-if="true == selected.item.canSetFinish4OpeSolu"
                        translate="aside.nav.process.fillsurgery">
                </button>
                <button type="button" ng-if="true == selected.item.canSetRetBySpecia" class="btn-fix btn btn-sm btn-default"
                        title="{{ 'business.patcase.return_doctor' | translate }}"
                        ng-click="setNew()"
                        translate="business.patcase.return_doctor">
                </button>
            </div>
            <div style="float: right;">
                <button class="btn btn-default" ng-click="cancel()" translate="common.close"
                        ng-hide="flag_needOpe || flag_setNoOpeNeeded || flag_setNew || flag_imageDiag || flag_opeSche">
                </button>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>

    <form class="panel panel-default" ng-show="flag_needOpe"  name="needope">
        <div class="modal-header"><h4 translate="business.patcase.send_for_operation_confirm"></h4></div>
        <div class="modal-body">
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="business.patcase.disease_type"></span></label>

                <div class="col-sm-9">
                    <select class="form-control" ng-model="selected.input.diseaseType">
                        <option value="" selected>{{ 'business.patcase.disease_type' | translate }}</option>
                        <option ng-repeat="item in diseaseType" value="{{ item.desc}}">
                            {{'business.patcase.disease_type_' + item.desc | translate}}
                        </option>
                    </select>
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="diagprocess.opeinstructions"></span></label>

                <div class="col-sm-9">
	            <textarea class="form-control" ng-model="selected.input.diag_Desc" rows="4" required style="resize: none;"
                          placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
                    <p class="text-danger" translate="diagprocess.required"></p>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
            <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                    ng-click="onSetStatus($event, 'NeedOpe', selected.item.servReq_Id, selected.input)"
                    ng-disabled="needope.$invalid"
                    translate="diagprocess.submitoperation">
            </button>
        </div>
    </form>

    <form class="panel panel-default" ng-show="flag_setNoOpeNeeded" name="noopeneed">
        <div class="modal-header"><h4 translate="business.patcase.send_for_no_operation_confirm"></h4></div>
        <div class="modal-body">
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span
                        translate="business.patcase.description"></span></label>

                <div class="col-sm-9">
            <textarea class="form-control" ng-model="selected.input.diag_Desc" rows="4" required style="resize: none;"
                      placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
                    <p class="text-danger" translate="diagprocess.required"></p>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
            <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                    ng-click="onSetStatus($event, 'NoOpeNeeded', selected.item.servReq_Id, selected.input)"
                    ng-disabled="noopeneed.$invalid" translate="diagprocess.submitnoperation">
            </button>
        </div>

    </form>

    <form class="panel panel-default" ng-show="flag_imageDiag" name="imagediag">
        <div class="modal-header">
            <h4 translate="aside.nav.process.fillimagediag"></h4>
        </div>
        <div class="modal-body">
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="business.patcase.disease_type"></span></label>
                <div class="col-sm-9">
                    <select class="form-control" ng-model="selected.input.diseaseType">
                        <option value="" selected>{{ 'business.patcase.disease_type' | translate }}</option>
                        <option ng-repeat="item in diseaseType" value="{{ item.desc}}" >
                            {{'business.patcase.disease_type_' + item.desc | translate}}</option>
                    </select>
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="diagprocess.imagediag"></span></label>
                <div class="col-sm-9">
	            <textarea class="form-control" ng-model="selected.input.diag_Desc" rows="4" required style="resize: none;"
                          placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
                    <p class="text-danger" translate="diagprocess.required"></p>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
            <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                    ng-click="onSetStatus($event, 'Finish4Diag', selected.item.servReq_Id, selected.input)"
                    ng-disabled="imagediag.$invalid"
                    translate="diagprocess.submitdiag">
            </button>
        </div>
    </form>

    <form class="panel panel-default" ng-show="flag_opeSche" name="opesche">
        <div class="modal-header">
            <h4 translate="aside.nav.process.fillsurgery"></h4>
        </div>
        <div class="modal-body">
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span translate="diagprocess.opesolution"></span></label>
                <div class="col-sm-9">
	            <textarea class="form-control" ng-model="selected.input.opeSolu_Desc" rows="4" style="resize: none;" required></textarea>
                    <p class="text-danger" translate="diagprocess.required"></p>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
            <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                    ng-click="onSetStatus($event, 'Finish4OpeSolu', selected.item.servReq_Id, selected.input)"
                    ng-disabled="opesche.$invalid"
                    translate="diagprocess.submitsolu">
            </button>
        </div>
    </form>

    <form class="panel panel-default" ng-show="flag_setNew" name="setnew">
        <div class="modal-header"><h4 translate="business.patcase.return_doctor_confirm"></h4></div>
        <div class="modal-body">
            <div class="form-group row">
                <label class="col-sm-2 control-label"><span
                        translate="business.patcase.description"></span></label>

                <div class="col-sm-9">
        <textarea class="form-control" ng-model="selected.input.diag_Desc" rows="4" required style="resize: none;"
                  placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
                  <p class="text-danger" translate="diagprocess.required"></p>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
            <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                    ng-click="onSetSelection($event, 'RetBySpecia', selected.item.servReq_Id, selected.input)"
                    ng-disabled="setnew.$invalid"
                    translate="diagprocess.submit">
            </button>
        </div>
    </form>

</div>
<!--<div class="modal-footer">-->


<!--</div>-->